Skip to content

Conversation

@shellmayr
Copy link
Member

@shellmayr shellmayr commented Jan 15, 2026

Add instrumentation for the claude-agent-sdk package, which provides
a Python interface to interact with Claude Code CLI.

The integration captures:

  • gen_ai.system: "claude-agent-sdk-python"
  • gen_ai.operation.name: "chat"
  • gen_ai.request.model / gen_ai.response.model
  • gen_ai.request.messages (when PII enabled)
  • gen_ai.response.text (when PII enabled)
  • gen_ai.request.available_tools
  • gen_ai.response.tool_calls
  • gen_ai.usage.input_tokens / output_tokens / total_tokens
  • gen_ai.usage.input_tokens.cached

Instrumented methods:

  • query() async generator function for one-shot queries
  • ClaudeSDKClient.query() and receive_response() for interactive sessions

Closes TET-1743
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • feat(ai): add claude code agents sdk integration by shellmayr in #5316
  • feat(anthropic): Set system instruction attribute by alexander-alderman-webb in #5353
  • feat(google-genai): Set system instruction attribute by alexander-alderman-webb in #5354
  • feat(langchain): Set system instruction attribute by alexander-alderman-webb in #5357
  • feat(openai-agents): Set system instruction attribute by alexander-alderman-webb in #5355
  • feat(pydantic-ai): Set system instruction attribute by alexander-alderman-webb in #5356

Internal Changes 🔧

  • ci(release): Fix changelog-preview permissions by BYK in #5368
  • ci: Fix path in AI integration tests by alexander-alderman-webb in #5347

🤖 This preview updates automatically when you update the PR.

@constantinius
Copy link
Contributor

Excited about this!
Additional things we could capture:

@linear
Copy link

linear bot commented Jan 23, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants